﻿<!--#include file="utf-8.asp"-->
<!--#include file="conn.asp"-->
<!--#include file="seeion.asp"-->
<script language="javascript">
function showUploadDialog(s_Type, s_Link, s_Thumbnail){
var arr = showModalDialog("eWebEditor/dialog/i_upload.htm?style=popup&type="+s_Type+"&link="+s_Link+"&thumbnail="+s_Thumbnail, window, "dialogWidth:0px;dialogHeight:0px;help:no;scroll:no;status:no");}
</script>
<html>
<head>
<link href="images/style.css" type="text/css" rel="stylesheet" />
</head>
<body>

<%if request("type")="" then%>

<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td class="head"><strong>增加产品</strong></td>
</tr>
<tr>
<td>
<form method="post" name="myform" action="admin_shop_pass.asp?type=add">
<table width="100%" border="0" align="center" cellpadding="6" cellspacing="0">
<tr>
<td width="15%"><div align="center">产品名称<font color="#FF0000"> (中文)</font></div></td>
<td width="85%"><input name="title" type="text" id="title" size="40"></td>
</tr>
<tr id="EN_1">
<td width="15%"><div align="center">产品名称<font color="#FF0000"> (英文)</font></div></td>
<td><input name="etitle" type="text" id="etitle" size="40"></td>
</tr>
<tr>
<td width="15%" ><div align="center">产品分类</div></td>
<td>
<select name="ssfl" id="select">
<%
dim rsc
set rsc=server.CreateObject("adodb.recordset")
rsc.open "select * from shop_fl",conn,1,1
while not rsc.eof
response.Write("<option value=""" & rsc("id") & """>" & rsc("title") & "</option>")
rsc.movenext
wend
rsc.close
set rsc=nothing
%>
</select>
</td>
</tr>
<tr>
<td width="15%"><div align="center">产品编号</div></td>
<td>
<%
ProductNo=year(now)&month(now)&day(now)&hour(now)&minute(now)&second(now)
%>
<input type="text" name="ProductNo" id="ProductNo" value="<%=ProductNo%>" size="40" maxlength="50">
</td>
</tr>
<tr>
<td width="15%" ><div align="center">产品略缩图</div></td>
<td><input type=text name=imgs size=50>
<input type=button value="上传图片" onClick="showUploadDialog('image', 'myform.imgs', '')"> 
(缩略图尺寸：165*120)</td>
</tr>
<tr>
<td width="15%" ><div align="center">产品大图</div></td>
<td><input type=text name=imgb size=50>
<input type=button value="上传图片" onClick="showUploadDialog('image', 'myform.imgb', '')">
(大图尺寸：570*410)</td>
</tr>
<tr>
<td width="15%" ><div align="center">产品介绍<font color="#FF0000"> (中文)</font></div></td>
<td><INPUT type="hidden" name="body" value="">
<IFRAME ID="eWebEditor1" SRC="ewebeditor/ewebeditor.htm?id=body&style=popup" FRAMEBORDER="0" SCROLLING="no" WIDTH="100%" HEIGHT="400"></IFRAME> </td>
</tr>
<tr id="EN_2">
<td width="15%" ><div align="center">产品介绍 <font color="#FF0000">(英文)</font></div></td>
<td><INPUT type="hidden" name="ebody" value="">
<IFRAME ID="eWebEditor1" SRC="ewebeditor/ewebeditor.htm?id=ebody&style=popup" FRAMEBORDER="0" SCROLLING="no" WIDTH="100%" HEIGHT="400"></IFRAME></td>
</tr>
<tr>
<td width="15%" >&nbsp;</td>
<td><input type="submit" name="button"  value="確认提交" /></td>
</tr>
</table>
</form>
</td>
</tr>
</table>

<%else%>

<% 
exec="select * from shop where id="& request.QueryString("id") 
set rs=server.createobject("adodb.recordset") 
rs.open exec,conn,1,1 
%>

<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td class="head"><strong>修改产品</strong></td>
</tr>
<tr>
<td>
<FORM method="post" name="myform" action="admin_shop_pass.asp?type=update">
<table width="100%" border="0" align="center" cellpadding="6" cellspacing="0">
<tr>
<td width="15%"><div align="center">产品名称<font color="#FF0000"> (中文)</font></div></td>
<td width="85%"><input name="title" type="text" id="title" value="<%=rs("title")%>" size="40"><input name="id" type="hidden" id="id" value="<%=request.querystring("id")%>" /></td>
</tr>
<tr id="EN_1">
<td width="15%"><div align="center">产品名称<font color="#FF0000"> (英文)</font></div></td>
<td><input name="etitle" type="text" id="etitle" value="<%=rs("etitle")%>" size="40"></td>
</tr>
<tr>
<td width="15%"><div align="center">产品分类</div></td>
<td>
<select name="ssfl" id="select">
<%
set rsc=server.CreateObject("adodb.recordset")
rsc.open "select * from shop_fl",conn,1,1
while not rsc.eof
if rs("ssfl")=rsc("id") then
response.Write("<option value=""" & rsc("id") & """ selected>" & rsc("title") & "</option>")
else
response.Write("<option value=""" & rsc("id") & """>" & rsc("title") & "</option>")
end if
rsc.movenext
wend
rsc.close
set rsc=nothing
%>
</select></td>
</tr>
<tr>
<td width="15%"><div align="center">产品编号</div></td>
<td><font color="#FF0000"><%=rs("ProductNo")%></font></td>
</tr>
<tr>
<td width="15%"><div align="center">产品略缩图</div></td>
<td><input name=imgs type=text value="<%=rs("imgs")%>" size=50>
<input type=button value="上传图片" onClick="showUploadDialog('image', 'myform.imgs', '')">
(缩略图尺寸：165*120)</td>
</tr>
<tr>
<td width="15%"><div align="center">产品大图</div></td>
<td><input name=imgb type=text value="<%=rs("imgb")%>" size=50>
<input type=button value="上传图片" onClick="showUploadDialog('image', 'myform.imgb', '')">
(大图尺寸：570*410)</td>
</tr>

<tr>
<td width="15%"><div align="center">产品介绍<font color="#FF0000"> (中文)</font></div></td>
<td><input type="hidden" name="body" value='<%=replace(rs("body"),"'","&#39;")%>'/>
<IFRAME ID="eWebEditor1" SRC="ewebeditor/ewebeditor.htm?id=body&style=popup" FRAMEBORDER="0" SCROLLING="no" WIDTH="100%" HEIGHT="400"></IFRAME></td>
</tr>
<tr id="EN_2">
<td width="15%"><div align="center">产品介绍 <font color="#FF0000">(英文)</font></div></td>
<td><input type="hidden" name="ebody" value='<%=replace(rs("ebody"),"'","&#39;")%>'/>
<IFRAME ID="eWebEditor1" SRC="ewebeditor/ewebeditor.htm?id=ebody&style=popup" FRAMEBORDER="0" SCROLLING="no" WIDTH="100%" HEIGHT="400"></IFRAME></td>
</tr>
<tr>
<td width="15%">&nbsp;</td>
<td><input type="submit" name="button"  value="確认提交" /></td>
</tr>
</table>
</form>
</td>
</tr>
</table>

<%end if%>

</body>
</html>
<!--#include file="Language.asp"-->
